<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>监理服务系统</title>

    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--extended-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${re.contextPath}/pageoffice.js" id="po_js_main"></script>
</head>
<style>
    .layui-tab-title {
        overflow-x: auto !important;
        overflow-y: auto !important;
        height: auto !important;
    }

    .nomor {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
    }
</style>

<body>
<!--容器-->
<div class="container clearfix">
    <div class="projectDetail">
        <div class="projectDetailMain whitebg clearfix">
            <div class="projectDetailMainLf fl">
                <div class="ft18 bold">项目信息</div>
                <ul class="projectDetailUl clearfix">
                    <li>
                        <input type="hidden" name="id" id="id" value="${project.id}">
                        <div title="${project.projectName}"><label class="gary">项目名称：</label>${project.projectName}</div>
                        <div title="${project.projectTypeName}">
                            <label class="gary">项目类型：</label>${project.projectTypeName}</div>
                        <div class="nomor" title="${project.projectSourceName}"><label
                                    class="gary">项目来源：</label>${project.projectSourceName}</div>
                        <div class="nomor" title="${project.contractNo}"><label
                                    class="gary">合同编号：</label>${project.contractNo}</div>
                        <div title="${project.jlHtName}"><label
                                    class="gary">咨询合同名称：</label>${project.jlHtName}</div>
                    </li>
                    <li>
                        <div class="nomor" title="${project.totalDurationBeginDate} 至 ${project.totalDurationEndDate}"><label class="gary">总工期：</label>${project.totalDurationBeginDate}
                            至 ${project.totalDurationEndDate} </div>
                        <div class="nomor" title="${project.tzMoney}元"><label class="gary">投资额：</label>${project.tzMoney}元</div>
                                           <div><label class="gary">业务类型：</label>${project.checkShapeName}</div>
                        <div class="nomor" title="${project.insideContractNo}"><label class="gary">内部合同编号：</label>${project.insideContractNo}</div>
                        <div class="nomor" title="${project.payOrProjectNo}"><label class="gary">采购/项目编号：</label>${project.payOrProjectNo}</div>
                        <#--                        <div style="width: 400px">-->
                        <#--                            <label class="gary" style="display:block;float:left;width:100px;">项目分布地：</label>-->
                        <#--                            <#list listpalce as vo>-->
                        <#--                                <div style="float:left;width:200px;">${vo.provinceName} ${vo.cityName} ${vo.countyName}</div>-->
                        <#--                            </#list>-->

                        <#--                        </div>-->
                    </li>
                    <li>
                        <div class="nomor" title="${project.provinceName} ${project.cityName} ${project.countyName}">
                            <label class="gary">合同签订地点：</label>${project.provinceName} ${project.cityName} ${project.countyName}
                        </div>
                        <div class="nomor" title="${project.projectOwnerName}"><label class="gary">项目归属：</label>${project.projectOwnerName}</div>
                        <div class="nomor" title="${project.hyTypeName}"><label class="gary">行业类型：</label>${project.hyTypeName}</div>
                        <div class="nomor" title="${project.isContinueName}"><label class="gary">是否续签：</label>${project.isContinueName}</div>
                    </li>
                </ul>
                <div class="ft18 ">咨询单位：${project.supervisorCompanyName}</div>
                <ul class="projectDetailUl clearfix">
                    <li>
                        <div class="nomor" title="${project.projectManagerPersonName}"><label class="gary">项目经理：</label>${project.projectManagerPersonName}</div>
                        <div class="nomor" title="${project.htMoney}元"><label class="gary">咨询合同额：</label>${project.htMoney}元</div>
                    </li>
                    <li>
                        <div class="nomor" title="${project.industryPersonName}"><label class="gary">行业负责人：</label>${project.industryPersonName}</div>
                        <div class="nomor" title="${project.jlPayMoney}元"><label class="gary">咨询已支付金额：</label><span id="jlzf">${project.jlPayMoney}</span>元</div>
                    </li>
                    <li>
                        <div class="nomor" title="${project.technologyPersonName}"><label class="gary">技术负责人：</label>${project.technologyPersonName}</div>
                    </li>
                    <li>
                        <div class="nomor" title="${project.zxAdviserName}"><label class="gary">咨询工程师：</label>${project.zxAdviserName}</div>
                    </li>
                </ul>
                <div class="progressArticle whitebg clearfix" style=" height: 30px;line-height: 30px;">
                    <div class="fl" style="width: 20%;margin-right: 0px;">项目进度</div>
                    <div class="layui-progress layui-progress-big fl" lay-showpercent="true"
                         style="width: 50%;margin-left: 5px;margin-top: 11px;">
                        <div id="proprogress" class="layui-progress-bar" lay-percent="${project.progress}%"></div>
                    </div>
                </div>

            </div>
            <div class="projectDetailMainRt fr">
                <div class="ft18 ">业主单位：${project.owerCompany}</div>
                <ul class="projectDetailMainRtOne" style="padding: 10px;font-size: 14px;height: 110px;">
                    <#list listyz as vo>
                        <li class="clearfix">
                            <div>
                                <div class="gary ">项目负责人</div>
                                <div>${vo.realName}</div>
                            </div>
                            <div>
                                <div class="gary">职务</div>
                                <div>${vo.duty}</div>
                            </div>
                        </li>
                    </#list>
                </ul>
                <div class="projectDetailCont clearfix">
                    <div class="projectDetailContLf fl" style="width: 47%;padding-bottom: 0;">
                        <div class="ft18 ">项目阶段</div>
                        <ul class="clearfix">
                            <#list listStage as vo>
                                <li title="${vo.startTime} 至 ${vo.endTime}">
                                    <#if "${vo.stageNo}"!="005" >
                                        <span>${vo.orderNum}</span>
                                        <span class="ml10 ft14">${vo.stageName}</span>
                                        <span class="ml10 ft12 gary">${vo.startTime} 至 ${vo.endTime}</span>
                                    </#if>
                                </li>
                            </#list>
                        </ul>
                    </div>
                    <div class="projectDetailContLf fl ml20" style="width: 47%;padding-bottom: 0;">
                        <div class="ft18 ">咨询费付款方式</div>
                        <ul class="clearfix">
                            <#list listpay as vo>
                                <li>
                                    <span>${vo.sppNo}</span>
                                    <span class="ml10 ft14 gary">第${vo.sppNo}次付款</span>
                                    <span class="ml10 ft12 ">${vo.milepostName}</span>
                                    <#if "${project.fkType}" == "1">
                                        <span class="ml10 ft12 ">${vo.sppPersent}</span>
                                    </#if>
                                    <#if "${project.fkType}" == "2">
                                        <span class="ml10 ft12 ">${vo.payDate}</span>
                                    </#if>
                                </li>
                            </#list>
                        </ul>
                    </div>
                    <#--<div class="projectDetailContRt fr">
                        <div class="ft18">项目分包数：${project.fbNum}个</div>
                        <ul class="clearfix">
                            <#list listfb as vo>
                                <li><span class="gary">分包编号</span> <span>${vo.code}</span></li>
                            </#list>
                        </ul>
                    </div>-->
                </div>
                <div>
                    <@shiro.hasPermission name="file:statisticszx">
                        <button type="button" class="layui-btn"
                                style="width: 80px;height: 35px;line-height: 35px;padding:0;"
                                onclick="_prom_page.events.wdTj(this)"> 文档统计
                        </button>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="file:eventszx">
                    <button type="button" class="layui-btn"
                            style="width: 80px;height: 35px;line-height: 35px;padding:0;background: #FF4343;"
                            onclick="_prom_page.events.bigEvent(this)">项目大事记
                    </button>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="file:exprotALlzx">
                    <button type="button" class="layui-btn"
                            style="width: 80px;height: 35px;line-height: 35px;padding:0;background: #5775EF;"
                            onclick="exportall()">一键导出
                    </button>
                    </@shiro.hasPermission>
                </div>
            </div>
        </div>
    </div>
    <a name="abs" class="maodian"></a>
    <div class="Details clearfix">
        <!--左侧导航栏-->
        <div class="DetailsLf fl">
            <div class="DetailsLfBOx whitebg" id="divLeft">
                <#list listStage as vo>
                    <div class="blue bold ft18 clearfix">
                        <#if "${vo.finishStatus}"=="3">
                            <img src="${re.contextPath}/plugin/common/images/14@2x.png" id="jd${vo.id}" alt=""
                                 class="fl">
                        <#elseif  "${vo.finishStatus}"=="2">
                            <img src="${re.contextPath}/plugin/common/images/15@2x.png" id="jd${vo.id}" alt=""
                                 class="fl">
                        <#elseif  "${vo.finishStatus}"=="1">
                            <img src="${re.contextPath}/plugin/common/images/16@2x.png" id="jd${vo.id}" alt=""
                                 class="fl">
                        <#elseif  "${vo.finishStatus}"=="0">
                            <img src="${re.contextPath}/plugin/common/images/17@2x.png" id="jd${vo.id}" alt=""
                                 class="fl">
                        </#if>
                        <span class="fll" value="${vo.id}"
                              projectId="${vo.projectId}">${vo.stageName}</span>
                    </div>
                    <ul>
                        <#list listmilepost as vm>
                            <#if vm.supervisorProjectStageId==vo.id>
                                <li lay-url="${vm.url}" onclick='queryYw(this)'>
                                    <#if vm.finishStatus=="3">
                                        <img src="${re.contextPath}/plugin/common/images/14@2x.png" id="lc${vm.id}"
                                             alt="">
                                    <#elseif  vm.finishStatus=="2">
                                        <img src="${re.contextPath}/plugin/common/images/15@2x.png" id="lc${vm.id}"
                                             alt="">
                                    <#elseif  vm.finishStatus=="1">
                                        <img src="${re.contextPath}/plugin/common/images/16@2x.png" id="lc${vm.id}"
                                             alt="">
                                    <#elseif  vm.finishStatus=="0">
                                        <img src="${re.contextPath}/plugin/common/images/17@2x.png" id="lc${vm.id}"
                                             alt="">
                                    </#if>
                                    <span style="padding-left: 7px" class="spanLc" value="${vm.id}"
                                          lay-jd="${vo.id}">${vm.milepostName}</span>
                                </li>
                            </#if>
                        </#list>
                    </ul>
                </#list>
            </div>
        </div>
        <!--右侧导航栏-->
        <div class="DetailsRt fr" id="divRight">
        </div>
        <input type="hidden" id="isyz" value="${isyz}">
        <input type="hidden" id="cfsq" value="${cfsq}">
        <input type="hidden" id="jfsq" value="${jfsq}">
        <input type="hidden" id="jflq" value="${jflq}">
        <input type="hidden" id="jlsp" value="${jlsp}">
        <input type="hidden" id="jlsh" value="${jlsh}">
        <input type="hidden" id="fview" value="${fview}">
        <input type="hidden" id="fexport" value="${fexport}">
        <input type="hidden" id="fupseal" value="${fupseal}">
        <input type="hidden" id="fsign" value="${fsign}">
        <input type="hidden" id="fupimg" value="${fupimg}">
        <input type="hidden" id="flistdel" value="${flistdel}">
        <input type="hidden" id="dept" value="${dept}">



    </div>
</div>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/system/zx/projectManager.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/common/js/jquery.common.js"></script>
<script>

    $(function () {
        //如果项目进度过小,调整样式:
        setTimeout(function () {
            formatProgress();
        }, 1000);

    })

    //进度值太小时美化进度条
    function formatProgress() {
        var percent = $('#proprogress');
        if (percent) {
            var perOld = percent.attr('lay-percent');
            var per = perOld.replace("%", "");
            if (parseFloat(per) < 5 && parseFloat(per) > 0) {
                percent.css("width", "5%");
            }
        }
    }

    /*
    *   点击里程碑 加载业务类型
    * */
    function queryYw(object) {
        var that = $(object);
        if (that.is('li')) {
            var url = that.attr("lay-url");
            var spmid = that.find('span').attr("value");
            var stageid = that.find('span').attr("lay-jd");// 阶段id

            that.parent().parent().find('li').removeClass('selected');
            that.addClass('selected')
            //加个标记，让跳转到锚点
            localStorage.setItem("pageMove", "1");
            $('#divRight').load("" + url + "&id=${project.id}&spmid=" + spmid + "&stageid=" + stageid + "", function () {
                //其他操作，可对载入的 handle.html 中元素进行操作
                removeModify();
            });
        }
    }

    function removeModify() {
        var _model = getQueryString('type');
        if (!(_model == 'm')) {
            $('.downModuleBtn').hide();
            $('.btn_dzsign').hide();
            $('.btn_gz').hide();
            $('.btn_jlnbsp').hide();
            $('.btn_jlnbsh').hide();
            $('.btn_jfsq').hide();
            $('.btn_cfsq').hide();
            $('.btn_jflq').hide();
            $('.sc_image').hide();
            $('.qr_uplaod').hide();
            $('.pl_delete').hide();
            $('.upImage').hide();
            $('.btn_hzd').hide();
            $('.btn_kxjc').hide();
            $('.btn_jdjc').hide();
            $('.upfj').hide();
            $('.upseal').hide();
        }
    }

    removeModify();
    setTimeout("goFirst()", 1000);

    function goFirst() {
        $(".DetailsLfBOx li:eq(0)").click();
    }

    function exportall(){
        var   id="${project.id}";
        var   projectName="${project.projectName}";
        parent.layer.confirm('确定要导出所有的文档？', function (index) {
            parent.layer.close(index);
            window.location.href="/zx/projectManager/export?id="+id+'&name='+projectName;
        });
    }
</script>
</body>

</html>
